package fr.gla.hibtracker.historique.beans;

public class ELProperty {

	private String elName;
    private Object previousValue;
    private Object newValue;
    private boolean dirty;
    
    public ELProperty(String elName, Object previousValue, Object newValue) {
        this(elName, previousValue, newValue, true);
    }
    
    public ELProperty(String elName, Object previousValue, Object newValue,boolean dirty) {
        super();
        this.elName = elName;
        this.previousValue = previousValue;
        this.newValue = newValue;
        this.dirty = dirty;
    }
    
    public String getElName() {
        return elName;
    }
    public Object getNewValue() {
        return newValue;
    }
    public Object getPreviousValue() {
        return previousValue;
    }
    
    public void setNewValue(Object newValue) {
		this.newValue = newValue;
	}
    
    public boolean isDirty() {
		return dirty;
	}
    
    public void setDirty(boolean dirty) {
		this.dirty = dirty;
	}
    @Override
    public String toString() {
    	return "dirty property ["+elName+"] previous="+previousValue+" new="+newValue;
    }
}
